package com.base.pd.agent;

import java.util.Random;


public class AgentFinalRandom extends Agent {
	private boolean cooperate;
	public AgentFinalRandom() {
		super("FinalRandom", "Maiken");
		
	}

	@Override
	public boolean cooperate() {
		return  cooperate;
	}

	@Override
	public void update(int round, boolean myMove, boolean otherMove,
			int myScore, int otherScore) {
		if(round>=50){
			
			cooperate=new Random().nextBoolean();
		}else{
			cooperate=otherMove;
		}
	}

	@Override
	public void init() {		
	}

}
